<?php

abstract class Kzend_ModelBase
{
    protected $_logger = null;
    protected $_messageManager = null;

    public function __construct()
    {
        $this->_logger = Zend_Registry::get("Kzend_Logger");
        $this->_messageManager = Zend_Registry::get("Kzend_MessageManager");

        $this->init();
    }

    public abstract function init();

    public function getLogger()
    {
        return $this->_logger;
    }

    protected function _getStdClass($result, $returnColumns = null, $omitColumns = null)
    {
        return Kzend_DbUtils::getStdClass($result, $returnColumns, $omitColumns);
    }

    public function getMessage($msgId)
    {
        return $this->_messageManager->get($msgId);
    }

    public function getMessageManager()
    {
        return $this->_messageManager;
    }
}
